import re

# 默认是贪婪的, 如果想将贪婪变成非贪婪模式 * + ...后面加上?号
msg = 'abc1231bc'

res = re.match(r'abc(\d+?)', msg)
print(res)

path = '<div class="c-img c-img-radius-large  c-img3 compatible_rxApe"><span class="c-img-border c-img-radius-large"></span><img src="https://t15.baidu.com/it/u=2099900714,171345997&amp;fm=30&amp;app=106&amp;size=f242,150&amp;n=0&amp;f=JPEG&amp;fmt=auto?s=D73B15C7381A66C6082CA9F103005018&amp;sec=1672851600&amp;t=6e1fdf6d550afa84718a86134ec4fc34" aria-hidden="false" alt="" aria-label="" style="width: 128px;height: 85px;"></div>'

res = re.search(r'<img src="(.+?)"', path)
print(res.group(1))